home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_ghostscript.idb / usr / freeware / catman / u_man / cat1 / cjpeg.Z / cjpeg
Encoding:
Text File  |  1998-05-21  |  15.4 KB  |  332 lines

  1. /xlv1/freeware/1998.May/ghostscript/3.33+jpeg/gs3.33.diffbuild/jpeg-5a
  2.  
  3.  
  4.  
  5.      CCCCJJJJPPPPEEEEGGGG((((1111))))          UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((33330000    AAAAuuuugggguuuusssstttt 1111999999994444))))          CCCCJJJJPPPPEEEEGGGG((((1111))))
  6.  
  7.  
  8.  
  9.      NNNNAAAAMMMMEEEE
  10.       cjpeg    - compress an image file to a JPEG file
  11.  
  12.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.       ccccjjjjppppeeeegggg    [ _o_p_t_i_o_n_s ] [ _f_i_l_e_n_a_m_e ]
  14.  
  15.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  16.       ccccjjjjppppeeeegggg    compresses the named image file, or the    standard input
  17.       if no    file is    named, and produces a JPEG/JFIF    file on    the
  18.       standard output.  The    currently supported input file formats
  19.       are: PPM (PBMPLUS color format), PGM (PBMPLUS    gray-scale
  20.       format), BMP,    GIF, Targa, and    RLE (Utah Raster Toolkit
  21.       format).  (RLE is supported only if the URT library is
  22.       available.)
  23.  
  24.      OOOOPPPPTTTTIIIIOOOONNNNSSSS
  25.       All switch names may be abbreviated; for example, ----ggggrrrraaaayyyyssssccccaaaalllleeee
  26.       may be written ----ggggrrrraaaayyyy or ----ggggrrrr.    Most of    the "basic" switches
  27.       can be abbreviated to    as little as one letter.  Upper    and
  28.       lower    case are equivalent (thus ----GGGGIIIIFFFF is the same as ----ggggiiiiffff).
  29.       British spellings are    also accepted (e.g., ----ggggrrrreeeeyyyyssssccccaaaalllleeee),
  30.       though for brevity these are not mentioned below.
  31.  
  32.       The basic switches are:
  33.  
  34.       ----qqqquuuuaaaalllliiiittttyyyy _N
  35.            Scale quantization tables to adjust image quality.
  36.            Quality is 0 (worst) to 100 (best); default is 75.
  37.            (See below for more info.)
  38.  
  39.       ----ggggrrrraaaayyyyssssccccaaaalllleeee
  40.            Create monochrome JPEG file from    color input.  Be sure
  41.            to use this switch when compressing a grayscale GIF
  42.            file, because ccccjjjjppppeeeegggg isn't bright    enough to notice
  43.            whether a GIF file uses only shades of gray.  By    saying
  44.            ----ggggrrrraaaayyyyssssccccaaaalllleeee, you'll get a    smaller    JPEG file that takes
  45.            less time to process.
  46.  
  47.       ----ooooppppttttiiiimmmmiiiizzzzeeee
  48.            Perform optimization of entropy encoding    parameters.
  49.            Without this, default encoding parameters are used.
  50.            ----ooooppppttttiiiimmmmiiiizzzzeeee usually makes the JPEG    file a little smaller,
  51.            but ccccjjjjppppeeeegggg runs somewhat slower and needs    much more
  52.            memory.    Image quality and speed    of decompression are
  53.            unaffected by ----ooooppppttttiiiimmmmiiiizzzzeeee.
  54.  
  55.       ----ttttaaaarrrrggggaaaa
  56.            Input file is Targa format.  Targa files    that contain
  57.            an "identification" field will not be automatically
  58.            recognized by ccccjjjjppppeeeegggg; for    such files you must specify
  59.            ----ttttaaaarrrrggggaaaa to make ccccjjjjppppeeeegggg treat the input as Targa format.
  60.            For most    Targa files, you won't need this switch.
  61.  
  62.  
  63.  
  64.      Page 1                         (printed 5/12/98)
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.      CCCCJJJJPPPPEEEEGGGG((((1111))))          UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((33330000    AAAAuuuugggguuuusssstttt 1111999999994444))))          CCCCJJJJPPPPEEEEGGGG((((1111))))
  72.  
  73.  
  74.  
  75.       The ----qqqquuuuaaaalllliiiittttyyyy switch lets you trade off compressed file size
  76.       against quality of the reconstructed image: the higher the
  77.       quality setting, the larger the JPEG file, and the closer
  78.       the output image will    be to the original input.  Normally
  79.       you want to use the lowest quality setting (smallest file)
  80.       that decompresses into something visually indistinguishable
  81.       from the original image.  For    this purpose the quality
  82.       setting should be between 50 and 95; the default of 75 is
  83.       often    about right.  If you see defects at ----qqqquuuuaaaalllliiiittttyyyy 75, then
  84.       go up    5 or 10    counts at a time until you are happy with the
  85.       output image.     (The optimal setting will vary    from one image
  86.       to another.)
  87.  
  88.       ----qqqquuuuaaaalllliiiittttyyyy 100 will generate a quantization table of all 1's,
  89.       eliminating loss in the quantization step (but there is
  90.       still    information loss in subsampling, as well as roundoff
  91.       error).  This    setting    is mainly of interest for experimental
  92.       purposes.  Quality values above about    95 are nnnnooootttt recommended
  93.       for normal use; the compressed file size goes    up
  94.       dramatically for hardly any gain in output image quality.
  95.  
  96.       In the other direction, quality values below 50 will produce
  97.       very small files of low image    quality.  Settings around 5 to
  98.       10 might be useful in    preparing an index of a    large image
  99.       library, for example.     Try ----qqqquuuuaaaalllliiiittttyyyy 2    (or so)    for some
  100.       amusing Cubist effects.  (Note: quality values below about
  101.       25 generate 2-byte quantization tables, which    are considered
  102.       optional in the JPEG standard.  ccccjjjjppppeeeegggg    emits a    warning
  103.       message when you give    such a quality value, because some
  104.       commercial JPEG programs may be unable to decode the
  105.       resulting file.  Use ----bbbbaaaasssseeeelllliiiinnnneeee if you    need to    ensure
  106.       compatibility    at low quality values.)
  107.  
  108.       Switches for advanced    users:
  109.  
  110.       ----ddddcccctttt iiiinnnntttt
  111.            Use integer DCT method (default).
  112.  
  113.       ----ddddcccctttt ffffaaaasssstttt
  114.            Use fast    integer    DCT (less accurate).
  115.  
  116.       ----ddddcccctttt ffffllllooooaaaatttt
  117.            Use floating-point DCT method.  The floating-point
  118.            method is the most accurate, but    will be    the slowest
  119.            unless your machine has very fast floating-point
  120.            hardware.  Also note that results of the    floating-point
  121.            method may vary slightly    across machines, while the
  122.            integer methods should give the same results
  123.            everywhere.  The    fast integer method is much less
  124.            accurate    than the other two.
  125.  
  126.       ----rrrreeeessssttttaaaarrrrtttt _N
  127.  
  128.  
  129.  
  130.      Page 2                         (printed 5/12/98)
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.      CCCCJJJJPPPPEEEEGGGG((((1111))))          UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((33330000    AAAAuuuugggguuuusssstttt 1111999999994444))))          CCCCJJJJPPPPEEEEGGGG((((1111))))
  138.  
  139.  
  140.  
  141.            Emit a JPEG restart marker every    N MCU rows, or every N
  142.            MCU blocks if "B" is attached to    the number.  ----rrrreeeessssttttaaaarrrrtttt
  143.            0000 (the default) means no    restart    markers.
  144.  
  145.       ----ssssmmmmooooooootttthhhh _N
  146.            Smooth the input    image to eliminate dithering noise.
  147.            N, ranging from 1 to 100, indicates the strength    of
  148.            smoothing.  0 (the default) means no smoothing.
  149.  
  150.       ----mmmmaaaaxxxxmmmmeeeemmmmoooorrrryyyy _N
  151.            Set limit for amount of memory to use in    processing
  152.            large images.  Value is in thousands of bytes, or
  153.            millions    of bytes if "M"    is attached to the number.
  154.            For example, ----mmmmaaaaxxxx 4444mmmm selects 4000000 bytes.  If more
  155.            space is    needed,    temporary files    will be    used.
  156.  
  157.       ----oooouuuuttttffffiiiilllleeee _n_a_m_e
  158.            Send output image to the    named file, not    to standard
  159.            output.
  160.  
  161.       ----vvvveeeerrrrbbbboooosssseeee
  162.            Enable debug printout.  More ----vvvv's give more output.
  163.            Also, version information is printed at startup.
  164.  
  165.       ----ddddeeeebbbbuuuugggg
  166.            Same as ----vvvveeeerrrrbbbboooosssseeee.
  167.  
  168.       The ----rrrreeeessssttttaaaarrrrtttt option inserts extra markers that allow a JPEG
  169.       decoder to resynchronize after a transmission    error.
  170.       Without restart markers, any damage to a compressed file
  171.       will usually ruin the    image from the point of    the error to
  172.       the end of the image;    with restart markers, the damage is
  173.       usually confined to the portion of the image up to the next
  174.       restart marker.  Of course, the restart markers occupy extra
  175.       space.  We recommend ----rrrreeeessssttttaaaarrrrtttt    1111 for images that will be
  176.       transmitted across unreliable    networks such as Usenet.
  177.  
  178.       The ----ssssmmmmooooooootttthhhh option filters the input to eliminate fine-scale
  179.       noise.  This is often    useful when converting GIF files to
  180.       JPEG:    a moderate smoothing factor of 10 to 50    gets rid of
  181.       dithering patterns in    the input file,    resulting in a smaller
  182.       JPEG file and    a better-looking image.     Too large a smoothing
  183.       factor will visibly blur the image, however.
  184.  
  185.       Switches for wizards:
  186.  
  187.       ----aaaarrrriiiitttthhhhmmmmeeeettttiiiicccc
  188.            Use arithmetic coding rather than Huffman coding.  (Not
  189.            currently supported for legal reasons.)
  190.  
  191.       ----bbbbaaaasssseeeelllliiiinnnneeee
  192.            Force a baseline    JPEG file to be    generated.  This
  193.  
  194.  
  195.  
  196.      Page 3                         (printed 5/12/98)
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.      CCCCJJJJPPPPEEEEGGGG((((1111))))          UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((33330000    AAAAuuuugggguuuusssstttt 1111999999994444))))          CCCCJJJJPPPPEEEEGGGG((((1111))))
  204.  
  205.  
  206.  
  207.            clamps quantization values to 8 bits even at low
  208.            quality settings.
  209.  
  210.       ----nnnnooooiiiinnnntttteeeerrrrlllleeeeaaaavvvveeee
  211.            Generate    noninterleaved JPEG file (not yet supported).
  212.  
  213.       ----qqqqttttaaaabbbblllleeeessss _f_i_l_e
  214.            Use the quantization tables given in the    specified
  215.            file.  The file should contain one to four tables (64
  216.            values each) as plain text.  Comments preceded by '#'
  217.            may be included in the file.  The tables    are implicitly
  218.            numbered    0,1,etc.  If ----qqqquuuuaaaalllliiiittttyyyy _N    is also    specified, the
  219.            values in the file are scaled according to ccccjjjjppppeeeegggg's
  220.            quality scaling curve.
  221.  
  222.       ----qqqqsssslllloooottttssss _N[,...]
  223.            Select which quantization table to use for each color
  224.            component.  By default, table 0 is used for luminance
  225.            and table 1 for chrominance components.
  226.  
  227.       ----ssssaaaammmmpppplllleeee _H_x_V[,...]
  228.            Set JPEG    sampling factors.  If you specify fewer    H/V
  229.            pairs than there    are components,    the remaining
  230.            components are set to 1x1 sampling.  The    default
  231.            setting is equivalent to    ----ssssaaaammmmpppplllleeee    2222xxxx2222.
  232.  
  233.       The "wizard" switches    are intended for experimentation with
  234.       JPEG.     If you    don't know what    you are    doing, ddddoooonnnn''''tttt uuuusssseeee tttthhhheeeemmmm.
  235.       You can easily produce files with worse image    quality    and/or
  236.       poorer compression than you'll get from the default
  237.       settings.  Furthermore, these    switches should    not be used
  238.       when making files intended for general use, because not all
  239.       JPEG implementations will support unusual JPEG parameter
  240.       settings.
  241.  
  242.      EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  243.       This example compresses the PPM file foo.ppm with a quality
  244.       factor of 60 and saves the output as foo.jpg:
  245.  
  246.            ccccjjjjppppeeeegggg ----qqqquuuuaaaalllliiiittttyyyy _6_0 _f_o_o._p_p_m >>>> _f_o_o._j_p_g
  247.  
  248.      HHHHIIIINNNNTTTTSSSS
  249.       Color    GIF files are not the ideal input for JPEG; JPEG is
  250.       really intended for compressing full-color (24-bit) images.
  251.       In particular, don't try to convert cartoons,    line drawings,
  252.       and other images that    have only a few    distinct colors.  GIF
  253.       works    great on these,    JPEG does not.    If you want to convert
  254.       a GIF    to JPEG, you should experiment with ccccjjjjppppeeeegggg's ----qqqquuuuaaaalllliiiittttyyyy
  255.       and ----ssssmmmmooooooootttthhhh options to get a satisfactory conversion.
  256.       ----ssssmmmmooooooootttthhhh 11110000 or    so is often helpful.
  257.  
  258.       Avoid    running    an image through a series of JPEG
  259.  
  260.  
  261.  
  262.      Page 4                         (printed 5/12/98)
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.      CCCCJJJJPPPPEEEEGGGG((((1111))))          UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((33330000    AAAAuuuugggguuuusssstttt 1111999999994444))))          CCCCJJJJPPPPEEEEGGGG((((1111))))
  270.  
  271.  
  272.  
  273.       compression/decompression cycles.  Image quality loss    will
  274.       accumulate; after ten    or so cycles the image may be
  275.       noticeably worse than    it was after one cycle.     It's best to
  276.       use a    lossless format    while manipulating an image, then
  277.       convert to JPEG format when you are ready to file the    image
  278.       away.
  279.  
  280.       The ----ooooppppttttiiiimmmmiiiizzzzeeee    option to ccccjjjjppppeeeegggg    is worth using when you    are
  281.       making a "final" version for posting or archiving.  It's
  282.       also a win when you are using    low quality settings to    make
  283.       very small JPEG files; the percentage    improvement is often a
  284.       lot more than    it is on larger    files.
  285.  
  286.      EEEENNNNVVVVIIIIRRRROOOONNNNMMMMEEEENNNNTTTT
  287.       JJJJPPPPEEEEGGGGMMMMEEEEMMMM
  288.            If this environment variable is set, its    value is the
  289.            default memory limit.  The value    is specified as
  290.            described for the ----mmmmaaaaxxxxmmmmeeeemmmmoooorrrryyyy switch.  JJJJPPPPEEEEGGGGMMMMEEEEMMMM overrides
  291.            the default value specified when    the program was
  292.            compiled, and itself is overridden by an    explicit
  293.            ----mmmmaaaaxxxxmmmmeeeemmmmoooorrrryyyy.
  294.  
  295.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  296.       ddddjjjjppppeeeegggg(1), rrrrddddjjjjppppggggccccoooommmm(1), wwwwrrrrjjjjppppggggccccoooommmm(1)
  297.       ppppppppmmmm(5), ppppggggmmmm(5)
  298.       Wallace, Gregory K.  "The JPEG Still Picture Compression
  299.       Standard", Communications of the ACM,    April 1991 (vol. 34,
  300.       no. 4), pp. 30-44.
  301.  
  302.      AAAAUUUUTTTTHHHHOOOORRRR
  303.       Independent JPEG Group
  304.  
  305.      BBBBUUUUGGGGSSSS
  306.       Arithmetic coding is not supported for legal reasons.
  307.  
  308.       Not all variants of BMP and Targa file formats are
  309.       supported.
  310.  
  311.       The ----ttttaaaarrrrggggaaaa switch is not a bug, it's a feature.  (It would
  312.       be a bug if the Targa    format designers had not been
  313.       clueless.)
  314.  
  315.       Still    not as fast as we'd like.
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.      Page 5                         (printed 5/12/98)
  329.  
  330.  
  331.  
  332.